/*  1:   */ package org.intellij.plugins.relaxNG.compact.psi.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.util.IncorrectOperationException;
import org.intellij.plugins.relaxNG.compact.RncElementTypes;
import org.intellij.plugins.relaxNG.compact.RncTokenTypes;
import org.intellij.plugins.relaxNG.compact.psi.RncElementVisitor;
import org.intellij.plugins.relaxNG.compact.psi.RncGrammar;
import org.intellij.plugins.relaxNG.compact.psi.RncPattern;
import org.jetbrains.annotations.NotNull;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */ 
/* 14:   */ public class RncGrammarImpl
/* 15:   */   extends RncElementImpl
/* 16:   */   implements RncGrammar
/* 17:   */ {
/* 18:   */   public RncGrammarImpl(ASTNode paramASTNode)
/* 19:   */   {
/* 20:36 */     super(paramASTNode);
/* 21:   */   }
/* 22:   */   
/* 23:   */   public void accept(@NotNull RncElementVisitor paramRncElementVisitor)
/* 24:   */   {
/* 25:40 */     if (paramRncElementVisitor == null) {
/* 26:40 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/intellij/plugins/relaxNG/compact/psi/impl/RncGrammarImpl", "accept" }));
/* 27:   */     }
/* 28:40 */     paramRncElementVisitor.visitGrammar(this);
/* 29:   */   }
/* 30:   */   
/* 31:   */   public void accept(CommonElement.Visitor paramVisitor)
/* 32:   */   {
/* 33:44 */     paramVisitor.visitGrammar(this);
/* 34:   */   }
/* 35:   */   
/* 36:   */   public RncPattern getStart()
/* 37:   */   {
/* 38:48 */     ASTNode localASTNode = getNode().findChildByType(RncElementTypes.START);
/* 39:49 */     return localASTNode != null ? (RncPattern)localASTNode.getPsi() : null;
/* 40:   */   }
/* 41:   */   
/* 42:   */   public PsiElement add(@NotNull PsiElement paramPsiElement)
/* 43:   */     throws IncorrectOperationException
/* 44:   */   {
/* 45:54 */     if (paramPsiElement == null) {
/* 46:54 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/intellij/plugins/relaxNG/compact/psi/impl/RncGrammarImpl", "add" }));
/* 47:   */     }
/* 48:54 */     PsiElement localPsiElement = findChildByType(RncTokenTypes.RBRACE);
/* 49:56 */     if (localPsiElement != null) {
/* 50:57 */       return addBefore(paramPsiElement, localPsiElement);
/* 51:   */     }
/* 52:59 */     return super.add(paramPsiElement);
/* 53:   */   }
/* 54:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.plugins.relaxNG.compact.psi.impl.RncGrammarImpl

 * JD-Core Version:    0.7.0.1

 */